﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COP.Plan;
using System.Configuration;

namespace COP.Readers
{
        public class JSONConfigReader : IConfigProvider
    {
        private static string doc = string.Empty;

        public JSONConfigReader() { }

        string source = null;
        public JSONConfigReader(string source)
        { this.source = source; }

        public object LoadConfig()
        {
            if (!string.IsNullOrEmpty(this.source))
            {
               //load the data from specific location
                return string.Empty;
            }
            else if (string.IsNullOrEmpty(doc))
            {
                COPSettings section = (COPSettings)ConfigurationManager.GetSection("COPSettings");
                //doc.Load(section.XMLSource.Path); 
                //load the data from config location
                return doc;
            }
            else
                return null;
        }
    }

}
